package com.platform.usercenter.domain;

import java.util.Date;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.core.annotation.Excel;
import com.platform.common.core.web.domain.BaseEntity;

/**
 * 组织上下游关系对象 sys_organization_relation
 *
 * @author platform
 * @date 2024-10-24
 */
@Data
public class SysOrganizationRelation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 组织ID */
    @Excel(name = "组织ID")
    private Long orgId;

    /**
     * 组织名称
     */
    private String orgName;

    /** 父组织id */
    @Excel(name = "父组织id")
    private Long parentId;

    private Set<Long> parentIds;

    /** 1 真实下级 2 业务关联下级 */
    @Excel(name = "1 真实下级 2 业务关联下级")
    private String relation;

    /** 关系组织主体id */
    @Excel(name = "关系组织主体id")
    private Long relationId;

    /** 是否删除(Y,N) */
    @Excel(name = "是否删除(Y,N)")
    private String isDelete;

    /** 删除人 */
    @Excel(name = "删除人")
    private String deleteBy;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deleteTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setOrgId(Long orgId)
    {
        this.orgId = orgId;
    }

    public Long getOrgId()
    {
        return orgId;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }
    public void setRelation(String relation)
    {
        this.relation = relation;
    }

    public String getRelation()
    {
        return relation;
    }
    public void setRelationId(Long relationId)
    {
        this.relationId = relationId;
    }

    public Long getRelationId()
    {
        return relationId;
    }
    public void setIsDelete(String isDelete)
    {
        this.isDelete = isDelete;
    }

    public String getIsDelete()
    {
        return isDelete;
    }
    public void setDeleteBy(String deleteBy)
    {
        this.deleteBy = deleteBy;
    }

    public String getDeleteBy()
    {
        return deleteBy;
    }
    public void setDeleteTime(Date deleteTime)
    {
        this.deleteTime = deleteTime;
    }

    public Date getDeleteTime()
    {
        return deleteTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orgId", getOrgId())
            .append("parentId", getParentId())
            .append("relation", getRelation())
            .append("relationId", getRelationId())
            .append("remark", getRemark())
            .append("isDelete", getIsDelete())
            .append("deleteBy", getDeleteBy())
            .append("deleteTime", getDeleteTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
